const routes = [
  /** **************************************** 首页home **************************************** **/
  {
    path: '/',
    name: 'home',
    component: () => import('@/views/home/index.vue'),
    meta: {
      name: '售票首页',
      title: '售票首页',
      keepAlive: true
    }
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('@/views/Login.vue'),
    meta: {
      name: '登录',
      title: '登录',
      keepAlive: true
    }
  },
  {
    path: '/register',
    name: 'register',
    component: () => import('@/views/Register.vue'),
    meta: {
      name: '注册',
      title: '注册',
      keepAlive: true
    }
  },
  /** **************************************** 处理页 **************************************** **/
  // 重定向首页
  {
    path: '/home',
    redirect: '/',
    meta: {
      name: '车站售票系统系统',
      title: '车站售票系统系统',
      keepAlive: true
    }
  },
  // 错误页
  {
    path: '/404',
    name: 'Error404',
    component: () => import('@/views/error/404/index.vue'),
    meta: {
      name: '未找到页面',
      title: '未找到页面',
      keepAlive: false
    }
  },
  // 重定向404
  {
    path: '*',
    redirect: '/404',
    meta: {
      name: '未找到页面',
      title: '未找到页面',
      keepAlive: false
    }
  }
]

export default routes
